/*
 * Copyright 2011 Shotaro Uchida <fantom@xmaker.mx>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jazzkaffe;

/**
 * NodePowerDescriptor, part of the ZigBee Application Framework.
 * ZigBee Specification (Document 053474r17) 2.3.2.4
 * 
 * @author Shotaro Uchida <fantom@xmaker.mx>
 */
public interface ZigBeeNodePowerDescriptor {
    
    public byte getCurrentPowerMode();
    
    public static final byte SOURCE_MAINS_POWER = 0x01 << 1;
    public static final byte SOURCE_RECHARGEABLE_BATTERY = 0x01 << 2;
    public static final byte SOURCE_DISPOSABLE_BATTERY = 0x01 << 3;
    
    public byte getAvailablePowerSources();
    
    public byte getCurrentPowerSource();
    
    public static final byte LEVEL_CRITICAL = 0x00;
    public static final byte LEVEL_33_PERCENT = 0x10;
    public static final byte LEVEL_66_PERCENT = 0x20;
    public static final byte LEVEL_100_PERCENT = 0x30;
    
    public byte getCurrentPowerSourceLevel();
}
